package com.fy;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * 作者:何文超
 * 描述：佛祖保佑，永无Bug
 */
@SpringBootApplication
@EnableSwagger2
@MapperScan(basePackages = {"com.fy.module.*.mapper"})
public class ExamApp {
    public static void main(String[] args) {
        SpringApplication.run(ExamApp.class, args);
    }

    @Bean
    public MybatisPlusInterceptor interceptor(){
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
        return interceptor;
    }
}
